<?php /* Smarty version Smarty-3.0.9, created on 2013-05-18 21:07:37
         compiled from "C:/wamp/www/glight/templates\editar_videojuego.tpl" */ ?>
<?php /*%%SmartyHeaderCode:277485197ed997df155-36190245%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'f87c19874fa6c907ed30df68194b89a95a7886ee' => 
    array (
      0 => 'C:/wamp/www/glight/templates\\editar_videojuego.tpl',
      1 => 1368911247,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '277485197ed997df155-36190245',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php ob_start();?><?php echo $_SESSION['empleado']['login'];?>
<?php $_tmp1=ob_get_clean();?><?php if ($_tmp1=="Si"){?>


<style type="text/css"> @import url(../css/form.css); </style>
<h3>Editar Videojuego </h3>

<form action="<?php echo $_smarty_tpl->getVariable('gvar')->value['l__global'];?>
editar_videojuego.php?option=buscar" method="POST">          
    <table id="tableForm" class="tableForm" >
        <th colspan="2"> <br></th>
         <tr>
            <td>
                ID:
            </td>
            <td>
                <select required name="id" id="id" >
                   <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['i']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('videojuego')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['name'] = 'i';
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['i']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['i']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['i']['total']);
?>   
                       <option  <?php ob_start();?><?php echo $_smarty_tpl->getVariable('id_videojuego')->value;?>
<?php $_tmp2=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('id');?>
<?php $_tmp3=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->getVariable('id_videojuego')->value;?>
<?php $_tmp4=ob_get_clean();?><?php if (isset($_tmp2)&&$_tmp3==$_tmp4){?>selected<?php }?>  title="<?php echo $_smarty_tpl->getVariable('videojuego')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('id');?>
" value="<?php echo $_smarty_tpl->getVariable('videojuego')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('id');?>
"><?php echo $_smarty_tpl->getVariable('videojuego')->value[$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']]->get('nombre');?>
</option>                
                   <?php endfor; endif; ?>
               </select>          
            </td>  
            <td>
                <div class="submit">
                    <input  class="btn btn-primary" type="submit" value="seleccionar videojuego">
                </div>
            </td>
          </tr>
    </table>    
    </form>
               
               
               
     <?php if ($_GET['option']=='buscar'){?>    
         <form action="<?php echo $_smarty_tpl->getVariable('gvar')->value['l__global'];?>
editar_videojuego.php?option=editar" method="POST">
            <table id="tableForm" class="tableForm" >  
                <tr>
                    <td>
                        Id:
                    </td>
                    <td>
                        <input type="text" readonly required id="id" name="id" value="<?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('id');?>
">
                              
                    </td>
                </tr>

                <tr>
                    <td>
                        Nombre:
                    </td>
                    <td>
                        <input type="text" required id="nombre" name="nombre" value="<?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('nombre');?>
">
                    </td>
                </tr>
            <tr>
                <td>
                    Descripción:
                </td>
                <td>
                    <textarea required id="descripcion" name="descripcion"><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('descripcion');?>
</textarea>
                </td>
            </tr>
            <tr>
                <td>
                    Objetivo:
                </td>
                <td>
                    <textarea required id="objetivo" name="objetivo"><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('objetivo');?>
</textarea>
                </td>
            </tr>
            <tr>
                <td>
                    Género:
                </td>
                <td>
                    <select required name="genero">
                         <optgroup label="Acción">
                        <option value="Beat 'em up" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp5=ob_get_clean();?><?php if ($_tmp5=="Beat 'em up"){?>selected<?php }?> >Beat 'em up</option>
                        <option value="Lucha" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp6=ob_get_clean();?><?php if ($_tmp6=="Lucha"){?>selected<?php }?>>Lucha</option>
                        <option value="Sigilo" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp7=ob_get_clean();?><?php if ($_tmp7=="Sigilo"){?>selected<?php }?>>Sigilo</option>
                        <option value="Plataformas"<?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp8=ob_get_clean();?><?php if ($_tmp8=="Plataformas"){?>selected<?php }?>>Plataformas</option>
                    <optgroup label="Disparos" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp9=ob_get_clean();?><?php if ($_tmp9=="Disparos"){?>selected<?php }?>>
                        <option value="Disparos en primera persona" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp10=ob_get_clean();?><?php if ($_tmp10=="Disparos en primera persona"){?>selected<?php }?>>Disparos en primera persona</option>
                        <option value="Disparos en tercera persona" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp11=ob_get_clean();?><?php if ($_tmp11=="Disparos en tercera persona"){?>selected<?php }?>>Disparos en tercera persona</option>
                    </optgroup>
                    </optgroup>
                    <optgroup label="Simulación">
                        <option value="Simulación musical" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp12=ob_get_clean();?><?php if ($_tmp12=="Simulación musical"){?>selected<?php }?>>Simulación musical</option>
                        <option value="Simulación de combate" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp13=ob_get_clean();?><?php if ($_tmp13=="Simulación de combate"){?>selected<?php }?>>Simulación de combate</option>
                        <option value="Simulación de construcción" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp14=ob_get_clean();?><?php if ($_tmp14=="Simulación de construcción"){?>selected<?php }?>>Simulación de construcción</option>
                        <option value="Simulación de vida" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp15=ob_get_clean();?><?php if ($_tmp15=="Simulación de vida"){?>selected<?php }?>>Simulación de vida</option>
                        <option value="Arcade" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp16=ob_get_clean();?><?php if ($_tmp16=="Arcade"){?>selected<?php }?>>Arcade</option>
                        <option value="Deporte" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp17=ob_get_clean();?><?php if ($_tmp17=="Deporte"){?>selected<?php }?>>Deporte</option>
                        <option value="Carreras" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp18=ob_get_clean();?><?php if ($_tmp18=="Carreras"){?>selected<?php }?>>Carreras</option>
                        <option value="Agilidad mental" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp19=ob_get_clean();?><?php if ($_tmp19=="Agilidad mental"){?>selected<?php }?>>Agilidad mental</option>
                        <option value="Educación" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp20=ob_get_clean();?><?php if ($_tmp20=="Educación"){?>selected<?php }?>>Educación</option>
                    </optgroup>
                    <optgroup label="Aventura">
                        <option value="Aventura conversacional" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp21=ob_get_clean();?><?php if ($_tmp21=="Aventura conversacional"){?>selected<?php }?>>Aventura conversacional</option>
                        <option value="Aventura gráfica" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp22=ob_get_clean();?><?php if ($_tmp22=="Aventura gráfica"){?>selected<?php }?>>Aventura gráfica</option>
                        <option value="Aventura de Rol" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('genero');?>
<?php $_tmp23=ob_get_clean();?><?php if ($_tmp23=="Aventura de Rol"){?>selected<?php }?>>Aventura de Rol</option>
                    </optgroup>
                            
                    </select>
                </td>
            </tr>

            <tr>
                <td>
                    Clasificación:
                </td>
                <td>
                    <select required name="clasificacion">
                        <!--
                        Se toman las clasificaciones definidas por
                        la Junta de Clasificación de Software de Entretenimiento 
                        (ESRB, por sus siglas en inglés)
                        -->
                        <option value="EC" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('clasificacion');?>
<?php $_tmp24=ob_get_clean();?><?php if ($_tmp24=="EC"){?>selected<?php }?>>Niños pequeños (EC)</option>
                        <option value="E" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('clasificacion');?>
<?php $_tmp25=ob_get_clean();?><?php if ($_tmp25=="E"){?>selected<?php }?>>Todos (E)</option>
                        <option value="E10+" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('clasificacion');?>
<?php $_tmp26=ob_get_clean();?><?php if ($_tmp26=="E10+"){?>selected<?php }?>>Todas las personas mayores de 10 años (E10+)</option>
                        <option value="T" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('clasificacion');?>
<?php $_tmp27=ob_get_clean();?><?php if ($_tmp27=="T"){?>selected<?php }?>>Adolescentes (T)</option>
                        <option value="M" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('clasificacion');?>
<?php $_tmp28=ob_get_clean();?><?php if ($_tmp28=="M"){?>selected<?php }?>>Maduro (M)</option>
                        <option value="AO" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('clasificacion');?>
<?php $_tmp29=ob_get_clean();?><?php if ($_tmp29=="AO"){?>selected<?php }?>>Adultos únicamente (AO)</option>
                   
                    </select>
                </td>
            </tr>

            <tr>
                <td>
                    Modalidad:
                </td>
                <td>
                     <div class="formradio" id="formradio" >
                         <input type="radio" name="modalidad" value="Individual"  <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('modalidad');?>
<?php $_tmp30=ob_get_clean();?><?php if ($_tmp30=="Individual"){?>checked<?php }?>    >Individual<br>
                         <input type="radio" name="modalidad" value="Multijugador" <?php ob_start();?><?php echo $_smarty_tpl->getVariable('videojuego_sel')->value[0]->get('modalidad');?>
<?php $_tmp31=ob_get_clean();?><?php if ($_tmp31=="Multijugador"){?>checked<?php }?>   >Multijugador<br>
                     </div>
                </td>
            </tr>


            <input type="hidden"  id="gerente" name="gerente" value="<?php echo $_SESSION['empleado']['cedula'];?>
">
            <tr>
                <td></td>
                <td> 
                    <hr>
                    <div class="submit">
                       <input type="submit" value="Editar videojuego">
                    </div> 
              </td>
            </tr>
        </table>
    </form>
         <?php }?>
<!--
	Cuando se diligencie correctamente el formulario, debe aparecer la información.
	A continuación se recorren los campos del array $Videojuego, definido en defvideojuego.php
	El cual, por POST, lee los datos enviados, por POST, en el anterior formulario.
-->    
 <?php }else{ ?>
    Usted no tiene acceso al recurso solicitado, por favor registrese.
<?php }?>